package com.jinzhi.jinzhidata.dataobject;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author vansl
 * @description
 * @date 2020-01-03 16:24
 **/
@Data
@EntityListeners(AuditingEntityListener.class)
@Entity
@Table(name = "t_order")
public class Order {

    @Id
    private String orderId;

    private String orderUserId;

    private String orderGoodsId;

    /**
     * 单位为人民币
     */
    private BigDecimal orderPay;

    @CreatedDate
    private Date createTime;

    @LastModifiedDate
    private Date updateTime;

}
